package com.infoauto.opc.gateway.opc.model;

/**
 * 节点类型
 * */
public enum INodeType {
    UNKNOW(-1),//未知
    LABEL(2),//静态文本
    THIRD(3),//第三方接口
    OPC(4),
    OPC_SUBSCRIBE(0),//订阅
    OPC_READ(1),//轮循
    OPC_WRITE(5);//下发
    private int iNodeType;
    private INodeType(int index){
        this.iNodeType = index;
    }

    public static INodeType valueOf(int value){
        switch (value)
        {
            case 0:
                return INodeType.OPC_SUBSCRIBE;
            case 1:
                return INodeType.OPC_READ;
            case 2:
                return INodeType.LABEL;
            case 3:
                return INodeType.THIRD;
            case 4:
                return INodeType.OPC;
            case 5:
                return INodeType.OPC_WRITE;
            default:
                break;
        }
        return INodeType.UNKNOW;
    }

}